package com.fulihui.usercore.dto;

import java.util.Date;

/**
 * 商户合作信息
 * @author Willard.Hu on 2016/9/22 0022.
 */
public class CooperationInfoDTO extends AbstractDateDTO {
    private static final long serialVersionUID = -7989779607139043206L;
    /**
     * 主键
     */
    private int               id               = -1;
    /**
     * 商户主键
     */
    private String            mid;
    /**
     * 合作方式
     * @see com.fulihui.usercore.enums.CooperationMethodEnum
     */
    private String            method;
    /**
     * 合作方主键，第三方时初始化，用于获取其他第三方商户信息
     */
    private int               partnerId        = -1;
    /**
     * 合作方名称，第三方、抓取时填写
     */
    private String            partnerName;
    /**
     * 连接方式
     * @see com.fulihui.usercore.enums.CooperationConnectionEnum
     */
    private String            connType;
    /**
     * 合作开始时间
     */
    private long              startDate        = -1;
    /**
     * 合作结束时间
     */
    private long              endDate          = -1;

    public void startDate(Date d) {
        startDate = DateConv.d2s(d);
    }

    public Date startDate() {
        return DateConv.s2d(startDate);
    }

    public void endDate(Date d) {
        endDate = DateConv.d2s(d);
    }

    public Date endDate() {
        return DateConv.s2d(endDate);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getMid() {
        return mid;
    }

    public void setMid(String mid) {
        this.mid = mid;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public int getPartnerId() {
        return partnerId;
    }

    public void setPartnerId(int partnerId) {
        this.partnerId = partnerId;
    }

    public String getPartnerName() {
        return partnerName;
    }

    public void setPartnerName(String partnerName) {
        this.partnerName = partnerName;
    }

    public String getConnType() {
        return connType;
    }

    public void setConnType(String connType) {
        this.connType = connType;
    }

    public long getStartDate() {
        return startDate;
    }

    public void setStartDate(long startDate) {
        this.startDate = startDate;
    }

    public long getEndDate() {
        return endDate;
    }

    public void setEndDate(long endDate) {
        this.endDate = endDate;
    }
}
